home *** CD-ROM | disk | FTP | other *** search
-
-
-
- FREAD(3) MINTLIB LIBRARY FUNCTIONS FREAD(3)
-
-
- N✓NA✓AM✓ME✓E
- fread, fwrite - buffered binary input/output
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- #include <stdio.h>
-
- size_t fread (void *ptr, size_t size, size_t nitems,
- FILE *stream);
-
- size_t fwrite (const void *ptr, size_t size, size_t nitems,
- FILE *stream);
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- fread reads, into a block pointed to by ptr, nitems items
- of data from the named input stream stream, where an item
- of data is a sequence of bytes (not necessarily terminated
- by a null byte) of length size. It returns the number of
- items actually read. fread stops reading if an end-of-file
- or error condition is encountered while reading from
- stream, or if nitems items have been read. fread leaves
- the file pointer in stream, if defined, pointing to the
- byte follow- ing the last byte read if there is one. fread
- does not change the contents of the file referred to by
- stream.
-
- fwrite writes at most nitems items of data from the block
- pointed to by ptr to the named output stream stream. It
- returns the number of items actually written. fwrite stops
- writing when it has written nitems items of data or if an
- error condition is encountered on stream. fwrite does not
- change the contents of the block pointed to by ptr.
-
- If size or nitems is non-positive, no characters are read
- or written and 0 is returned by both fread and fwrite.
-
- R✓RE✓ET✓TU✓UR✓RN✓N V✓VA✓AL✓LU✓UE✓ES✓S
- fread and fwrite return the number of elements read on
- success, 0 on failure.
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- r✓re✓ea✓ad✓d(✓(3✓3)✓),✓, w✓wr✓ri✓it✓te✓e(✓(3✓3)✓),✓, f✓fo✓op✓pe✓en✓n(✓(3✓3)✓),✓, g✓ge✓et✓tc✓c(✓(3✓3)✓),✓, g✓ge✓et✓ts✓s(✓(3✓3)✓),✓, p✓pu✓ut✓tc✓c(✓(3✓3)✓),✓,
- p✓pu✓ut✓ts✓s(✓(3✓3)✓),✓, p✓pr✓ri✓in✓nt✓tf✓f(✓(3✓3)✓),✓, s✓sc✓ca✓an✓nf✓f(✓(3✓3)✓)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MiNT docs 0.1 3 March 1993 1
-
-
-